package Level_two;

import java.util.Scanner;

public class Twelve {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入您的购物金额：");
        double money = scanner.nextDouble();
        System.out.println("请输入您的会员等级(1代表为会员，0则否)：");
        int level = scanner.nextInt();
        String result = level == 1 ? "享受会员优惠" : "不享受会员优惠";
        if ("享受会员优惠".equals(result)) {
            if (money < 200 && money > 0) {
                money = money * 0.8;
            } else if (money >= 200) {
                money = money * 0.75;
            }
        } else {
            if (money >= 100)
                money = money * 0.9;
        }
        System.out.println(result+ "，最终应付金额为：" + money);
    }
}

